<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="css/bootstrap.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<title>项目管理软件</title>
	<style type="text/css">
		body{
			background-image:url(img/scribble_light.png);
			margin-left:150px;
		}
		.first{
			padding-top:80px;
			height:100px;
			text-align-left:300px;
		}
		
	</style>
</head>
<body >
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand">项目管理软件</a>
			</div>
		</div>
	</div>
	<div class="container">
	    <div class="row">
			<div class="first">
				<div class="span6">				
					<h2>项目列表</h2>
					
				</div>
				<div class="span3">
					<a href="project.jspx?_m=new" class="btn btn-success"><i class="icon-plus icon-white"></i>开始一个新项目</a>
				</div>
			</div>
		</div>
		<c:forEach items="${requestScope.project}" var="p" >
			<div class="row">
				<div class="span9">
					<ul class="breadcrumb">
						<li class="active">
							<a href="project.jspx?_m=get&id=${p.id }">${p.projectname }</a>
						</li>
						<li style="float:right">
						<a title="删除" class="del_link" rel="${p.id }" href="javascript:;"><i class="icon-trash"></i></a>
						<a href="project.jspx?_m=edit&id=${p.id }" title="修改"><i class="icon-pencil"></i></a>
						</li>
					</ul>
					<div style="height:50px;margin-bottom:7px">
						<p>${p.projecttext }</p>
					</div>					
				</div>
			</div>
		</c:forEach>		
	</div>  
	 <script type="text/javascript">
    	$(document).ready(function(){
    		$(".del_link").click(function(){
    			var id = $(this).attr("rel");
    			if(confirm("确定要删除此数据？")) {
					window.location.href = "project.jspx?_m=del&id=" + id;
    			}
    			
    		});
    		
    	});
    	
    </script> 
</body>
</html>